import { Switch, Route } from 'react-router-dom'
import React, { Component } from 'react';
//把刚才定义的底部引用进来 from后面写路径
import BodyIndex from '../zyyw/BodyIndex.js';
import BodyIndex1 from '../zyyw/BodyIndex1.js';
import BodyIndex2 from '../zyyw/BodyIndex2.js';
export default class Main extends  Component{
    //render() 解析类的一个输出
    render(){
        return(
            <main>
                <Switch>
                    <Route exact path='/' component={BodyIndex}/>
                    <Route path='/son' component={BodyIndex}/>
                    <Route path='/roster' component={BodyIndex1}/>
                    <Route path='/schedule' component={BodyIndex2}/>
                </Switch>
            </main>
        );
    }
}
